package data.composition.factory;

import data.composition.factory.core.CollectionDataComposition;
import data.composition.factory.impl.CollectionDataCompositionImpl;

import java.util.Collection;
import java.util.List;

/**
 * @author ZhangJinyu
 * @since 2024-12-13
 */
public class DataCompositionFactory {
    private DataCompositionFactory() {
    }

    public static <T> CollectionDataComposition<T> with(T data) {
        return with(List.of(data));
    }

    public static <T> CollectionDataComposition<T> with(Collection<T> data) {
        return new CollectionDataCompositionImpl<>(data);
    }

}
